package Week6;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.Scanner;

public class Day33 {
}

//牛客:DP3 跳台阶扩展问题
class Main7 {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        int n = in.nextInt();
        System.out.println(1 << (n-1));
    }
}

//牛客:NC402 包含不超过两种字符的最长子串
class Main8 {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        char[] s = in.next().toCharArray();
        int n = s.length;

        int left = 0 , right = 0 ,ret = 0 , count = 0;
        int[] hash = new int[26];

        while(right < n){
            if(hash[s[right] - 'a']++ == 0) count++;
            while(count > 2){
                if(hash[s[left++] - 'a']-- == 1) count--;
            }
            ret = Math.max(ret , right - left + 1);
            right++;
        }
        System.out.println(ret);
    }
}

//牛客:JZ38 字符串的排列
class Solution1 {
    /**
     * 代码中的类名、方法名、参数名已经指定，请勿修改，直接返回方法规定的值即可
     *
     *
     * @param str string字符串
     * @return string字符串ArrayList
     */
    boolean[] visits = new boolean[15];
    StringBuffer ret = new StringBuffer();
    ArrayList<String> list = new ArrayList<>();
    char[] s;
    int n;
    public ArrayList<String> Permutation (String str) {
        // write code here
        s = str.toCharArray();
        n = s.length;
        Arrays.sort(s);

        dfs(0);
        return list;
    }

    public void dfs(int pos){
        if(pos == n) {
            list.add(ret.toString());
            return;
        }

        for(int i = 0; i < n; i++){
            if(visits[i]) continue;
            if(i > 0 && s[i] == s[i - 1] && !visits[i - 1]) continue;
            ret.append(s[i]);
            visits[i] = true;
            dfs(pos + 1);
            visits[i] = false;
            ret.deleteCharAt(ret.length() - 1);
        }
    }
}